In a transmission process on an Internet Protocol (IP, Internet Protocol) network, a voice packet is generally transmitted in an unreliable transmission mode to ensure real-time data transmission. For example, the use of a User Datagram Protocol (UDP, User Datagram Protocol) transmission mode makes a packet loss inevitable. How to reduce deterioration of voice quality caused by a network packet loss is an important research topic in the field of voice data transmission over IP networks.
In the prior art, the following two solutions are generally used:
Solution 1 is a packet redundancy technology: Multiple copies of a same packet are sent at a transmit end; and original data can be completely recovered at a receive end, provided that one copy of the data is not lost.
Solution 2 is a technology of synthesizing a previous frame and a next frame: According to a frame before a packet loss and a frame after the packet loss, two frames of predicted data are separately generated by using a linear prediction method, and then transitive processing of hybrid weighting and smooth interpolation is performed for the two frames of data.
However, in the prior art solution 1, it is required to send multiple copies of a same packet, and consequently network bandwidth consumption multiplies, and network performance may deteriorate. In addition, a network packet loss may occur abruptly and last for a continuous period, and the multiple sent copies of data may be all lost. As a result, the lost packet still cannot be recovered at a receive end, thereby degrading voice quality and further causing a delay due to the packet loss. While in the prior art solution 2, a compensation packet is obtained by synthesizing a previous frame and a next frame, and compensation can be performed only when the next frame of data is received. If consecutive packet losses occur, the compensation is ineffective, thereby causing a relatively long delay.